package com.spudtech.tween
{
    
    import flash.geom.*;
    import flash.display.*;
    
    
    public class SpudMotion extends SpudPositionTween
    {
        
        protected var _target : DisplayObject;
        
        public function SpudMotion(init_target : DisplayObject,
                                   start_pos : Point,
                                   end_pos : Point,
                                   step_count : uint,
                                   play_mode : uint = PLAY_ONCE,
                                   init_easer : Function = null,
                                   init_callback : Function = null)
        {
            super(start_pos, end_pos, step_count, play_mode, init_easer, init_callback);
            
            _target = init_target;
            
        }
        
        
        override public function update() : void
        {
            super.update();
            
            var curr_pos : Point = currentPos;
            
            _target.x = curr_pos.x;
            _target.y = curr_pos.y;
            
        }
        
    }
    
}
